home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.004 / xemacs-1 / xemacs-19.13 / src / sunOS-fix.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-03-25  |  1.6 KB  |  65 lines

  1. /* This file is part of XEmacs.
  2.  
  3. XEmacs is free software; you can redistribute it and/or modify it
  4. under the terms of the GNU General Public License as published by the
  5. Free Software Foundation; either version 2, or (at your option) any
  6. later version.
  7.  
  8. XEmacs is distributed in the hope that it will be useful, but WITHOUT
  9. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  10. FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  11. for more details.
  12.  
  13. You should have received a copy of the GNU General Public License
  14. along with XEmacs; see the file COPYING.  If not, write to the Free
  15. Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  16.  
  17. /* Synched up with: Not in FSF. */
  18.  
  19. /* If you are using SunOS 4.1.1 and X11r5, then you need this patch.
  20.    There is a stupid bug in the SunOS libc.a: two functions which X11r5
  21.    uses, mbstowcs() and wcstombs(), are unusable when programs are
  22.    statically linked (as Emacs must be) because the static version of
  23.    libc.a contains the *dynamic* versions of these functions.  These
  24.    functions don't seem to be called when Emacs is running, so it's 
  25.    enough to define stubs for them.
  26.  
  27.    This appears to be fixed in SunOS 4.1.2.
  28.  */
  29.  
  30. #include <config.h>
  31.  
  32. #ifndef I18N4 /* we actually need these from the library in this case. */
  33.  
  34. #ifdef __STDC__
  35.  
  36. #include <stdlib.h>
  37.  
  38. size_t mbstowcs (wchar_t *foo, const char *bar, size_t baz)
  39. {
  40.   abort ();
  41.   return 0;
  42. }
  43.  
  44. size_t wcstombs (char *foo, const wchar_t *bar, size_t baz)
  45. {
  46.   abort ();
  47.   return 0;
  48. }
  49.  
  50. #else
  51.  
  52. void mbstowcs ()
  53. {
  54.   abort ();
  55. }
  56.  
  57. void wcstombs ()
  58. {
  59.   abort ();
  60. }
  61.  
  62. #endif /* __STDC__ */
  63.  
  64. #endif /* !I18N4 */
  65.